<md-dialog aria-label="Create" class="form-dialog" ng-cloak>
  <form name="form" class="form-horizontal" ng-submit="submit()" onvalidate>
    <md-toolbar>
      <div class="md-toolbar-tools">
        <h2 translate="ADMIN_PROJECT_CREATE_TEXT"></h2>
        <span flex></span>
        <md-button class="md-icon-button" ng-click="cancel()">
          <md-icon class="fa fa-times-circle" aria-label="Close dialog"></md-icon>
        </md-button>
      </div>
    </md-toolbar>
    <md-dialog-content>
      <md-content layout-padding>
        <md-input-container class="md-block" flex-gt-sm>
          <label translate="ADMIN_PROJECT_NAME"></label>
          <input name="projectName" ng-model="project.name" required>
          <div ng-messages="form.projectName.$error">
            <div ng-message="required" ng-if="form.projectName.$dirty">
              {{ 'FIELD_IS_REQUIRED' | translate }}
            </div>
          </div>
        </md-input-container>
      </md-content>
    </md-dialog-content>
    <md-dialog-actions layout="row">
    <md-button ng-click="cancel()">{{ 'CANCEL'  | translate}}</md-button>
    <md-button md-no-ink class="md-primary" ng-disabled="form.$invalid" type="submit">{{ 'SUBMIT' | translate }}</md-button>
    </md-dialog-actions>
  </form>
</md-dialog>
